package com.jzo2o.customer.controller.worker;


import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;

import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.WorkerCertificationAuditService;
import com.jzo2o.mvc.utils.UserContext;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@RestController("WorkerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务人员认证信息")
public class WorkerCertificationAuditController {
    @Resource
    WorkerCertificationAuditService workerCertificationAuditService;

    @PostMapping
    @ApiOperation("提交认证申请")
    public void auditCertification(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
        workerCertificationAuditAddReqDTO.setServeProviderId(UserContext.currentUserId());
        workerCertificationAuditService.certification(workerCertificationAuditAddReqDTO);
    }

    @GetMapping("/rejectReason")
    public RejectReasonResDTO rejectReason(){

       return workerCertificationAuditService.rejectReason();

    }



}
